#include <stdio.h>

int sum( int n );

int main()
{
    int n;

    scanf("%d", &n);
    printf ("%d\n", sum(n));

    return 0;
}

/* 你的代码将被嵌在这里 */

int sum ( int n ) {
    int sum_n = 0;
    if ( n > 1 ) {
        sum_n = n + sum ( n - 1 );
    } else if ( n == 1 ) {
        sum_n = n;
    }
    return sum_n;
}